import time

def bubble_sort(arr):
    for i in range(len(arr) - 1):
        for j in range(len(arr) - i - 1):
            if arr[j] > arr[j + 1]:
                arr[j], arr[j + 1] = arr[j + 1], arr[j]

files = ['m1_sorted.txt', 'm2_reverse.txt', 'm3_shuffle.txt']
for file in files:
    with open(file, 'r') as f:
        nums = [int(line) for line in f]
    start_time = time.time()
    bubble_sort(nums)
    end_time = time.time()
    duration = int((end_time - start_time) * 100)
    file = file.split('.')[0]
    print(f"file duration milliseconds")

